#ifndef RAW_CPU_H
#define RAW_CPU_H


#define  NEED_STATUS   1

typedef  unsigned int        CPU_SR;                   
CPU_SR OS_CPU_SR_Save(void);
void OS_CPU_SR_Restore(CPU_SR sr);
                                                              
#ifdef   NEED_STATUS
#define  RAW_SR_ALLOC()             CPU_SR  cpu_sr = (CPU_SR)0
#else
#define  RAW_SR_ALLOC() 
#endif

														
// #define  RAW_CRITICAL_ENTER()				{cpu_sr = OS_CPU_SR_Save();}

// #define  RAW_CRITICAL_EXIT()				{OS_CPU_SR_Restore(cpu_sr);}

#define	 RAW_CPU_DISABLE()					{cpu_sr = OS_CPU_SR_Save();}

#define  RAW_CPU_ENABLE()						{OS_CPU_SR_Restore(cpu_sr);}



#endif




